//
// Created by zhp on 2025/7/17.
//

#ifndef DEMOSYNTAXC_STUDENT_H
#define DEMOSYNTAXC_STUDENT_H

#include <string>

class student {

    int age;
    std::string name = "123";

    int sex;

public:
    // 构造器
    student() {
        this->age = 10;
        set_name("default name");
    }

    // 构造器2
    student(int age, const std::string &name, int sex = 1);

    // 析构函数
    ~student();

    // 方法
    std::string get_name();

private:
    void set_name(std::string name);
};


#endif //DEMOSYNTAXC_STUDENT_H
